﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
<asp:Panel ID="pnlData" runat="server">
  <asp:GridView ID="grvMaster" DataSourceID="dsMaster" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" OnRowDeleted="grvMaster_RowDeleted" OnPageIndexChanged="grvMaster_PageIndexChanged" OnSelectedIndexChanged="grvMaster_SelectedIndexChanged" OnRowDataBound="grvMaster_RowDataBound" runat="server">
    <Columns>
      <asp:TemplateField HeaderText="ACTIVITY_ID">
        <ItemTemplate>
          <asp:Label ID="tfACTIVITY_ID" Text="<%# Bind('ACTIVITY_ID') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="TITLE">
        <ItemTemplate>
          <asp:Label ID="tfTITLE" Text="<%# Bind('TITLE') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="DESCRIPTION">
        <ItemTemplate>
          <asp:Label ID="tfDESCRIPTION" Text="<%# Bind('DESCRIPTION') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="INSTITUTION">
        <ItemTemplate>
          <asp:Label ID="tfINSTITUTION" Text="<%# Bind('INSTITUTION') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="BEG_DATE">
        <ItemTemplate>
          <asp:Label ID="tfBEG_DATE" Text="<%# Bind('BEG_DATE') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="END_DATE">
        <ItemTemplate>
          <asp:Label ID="tfEND_DATE" Text="<%# Bind('END_DATE') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="CAN_DELETE">
        <ItemTemplate>
          <asp:Label ID="tfCAN_DELETE" Text="<%# Bind('CAN_DELETE') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="MULTI_REGISTRATION">
        <ItemTemplate>
          <asp:Label ID="tfMULTI_REGISTRATION" Text="<%# Bind('MULTI_REGISTRATION') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="BALLOT_WHEN_FULL">
        <ItemTemplate>
          <asp:Label ID="tfBALLOT_WHEN_FULL" Text="<%# Bind('BALLOT_WHEN_FULL') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="SINGLE_LIMIT">
        <ItemTemplate>
          <asp:Label ID="tfSINGLE_LIMIT" Text="<%# Bind('SINGLE_LIMIT') %>" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="修改">
        <ItemTemplate>
          <asp:Button ID="BtnEdit" CommandName="Select" Text="修改" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="刪除">
        <ItemTemplate>
          <asp:Button ID="BtnDelete" CommandName="Delete" Text="刪除" runat="server" />
        </ItemTemplate>
      </asp:TemplateField>
    </Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#006600" />
    <PagerSettings FirstPageText="第一頁" LastPageText="最末頁" Mode="NumericFirstLast" Position="Bottom" />
  </asp:GridView>
  <asp:ObjectDataSource ID="dsMaster" runat="server" TypeName="TPPDDB.FestivalTicketSystem.BLL_FESTIVAL_ACTIVITY" DataObjectTypeName="TPPDDB.FestivalTicketSystem.FESTIVAL_ACTIVITY" SelectMethod="SelectPaging" InsertMethod="Insert" UpdateMethod="Update" DeleteMethod="Delete" EnablePaging="True" SelectCountMethod="SelectCount" OnObjectCreating="dsMaster_ObjectCreating" OldValuesParameterFormatString="original_{0}">
    <SelectParameters>
      <asp:Parameter Name="startRowIndex" Type="Int32" />
      <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
  </asp:ObjectDataSource>
</asp:Panel>    
    </div>
    </form>
</body>
</html>
